A simple “folder watcher” agent script. It periodically checks the folder whose path is hard-coded into the targetPath variable, and beeps when items are added to or removed from it. The beep can be changed to something more sophisticated; just modify the folderChanged function.
Author: Jens Alfke.
This script is from the AppleScript Script Applications article in MacTech Magazine.